/**********************************************
*  Classes:   ParticleSystemManager
*  Desc:      Singleton class. Manages Particle
*			  Systems
*  Author:    Vaios Kalpias-Ilias (C) 2008-2009
***********************************************/

#ifndef PARTICLESYSTEMMANAGER_H
#define PARTICLESYSTEMMANAGER_H

#include <list>
#include "ParticleSystem.h"

class ParticleSystemManager
{
public:

	// gets single instance
	static ParticleSystemManager* GetInstance();
	// destroys instance
	static void Destroy();
	// initializes the manager
	bool Init();
	// resets the manager
	void Reset();
	// adds particle system
	void AddSystem (ParticleSystemPtr system);
	// removes particle system
	void RemoveSystem (ParticleSystemPtr system);
	// updates particle systems
	void MoveParticles(float dt);
	// renders systems
	void UpdateSystems();
	
private:

	// single instance
	static ParticleSystemManager* m_spInstance;
	// list of particle systems
	std::list<ParticleSystemPtr> m_lSystems;


	// private ctor / dtor
	ParticleSystemManager();
	~ParticleSystemManager();
	// shuts down manager
	void Shutdown();
};

#endif